﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Normal
{
    public enum AutoNumberStrategy { Native, Assigned, Sequence, Increment }

    [AttributeUsage(AttributeTargets.Property)]
    public class AutoNumber : Attribute
    {
        private AutoNumberStrategy _strategy;
        private string _sequenceTableName;
        private string _sequenceDescription;
        private string _sequenceId;

        public AutoNumber()
        {
            _strategy = AutoNumberStrategy.Sequence;
            _sequenceTableName = "sequence";
            _sequenceDescription = "name";
            _sequenceId = "id";
        }

        public AutoNumberStrategy Strategy
        {
            get { return _strategy; }
            set { _strategy = value; }
        }

        public string SequenceTableName
        {
            get { return _sequenceTableName; }
            set { _sequenceTableName = value; }
        }

        public string SequenceDescription
        {
            get { return _sequenceDescription; }
            set { _sequenceDescription = value; }
        }

        public string SequenceId
        {
            get { return _sequenceId; }
            set { _sequenceId = value; }
        }
    }
}
